package com.atguigu.yygh.order.mapper;

import com.atguigu.yygh.model.order.OrderInfo;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import com.atguigu.yygh.vo.order.OrderCountVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    //结果集中的两列的名称serverDate+COUNT,每一行封装成一个OrderCountVo
  //  @Select("SELECT reserve_date AS reserveDate,COUNT(1) AS COUNT FROM `order_info` GROUP BY reserve_date ORDER BY reserve_date ")
    public List<OrderCountVo> getOrderCount(OrderCountQueryVo orderCountQueryVo);
}
